package DomainLayer;

public class OrderLine
{
    private Product product;
    private int quantity;
   
    /**
     * @param product an ordered product from the stock.
     * @param quantity nummber of ordered product.
     */
    public OrderLine(Product product,int quantity)
    {
        this.product=product;
        this.quantity=quantity;
    }
    
    public Product getProduct()
    {
        return product;
        
    }
    
    public int getQuantity()
    {
        return quantity;
    }

    public void setQuantity(int quantity)
    {
        this.quantity=quantity;
    }
    
    public void setProduct(Product product)
    {
        this.product=product;
    }
    
    public double getOrderLinePrice()
    {
        return quantity*product.getPrice();
    }
}